﻿function LoadNextDoc(p) {
    $.ajax({
        async:false,
        url: $(p).find("a").attr("href"),
        method: 'get',
        success: function (e) {
            if (e != "") {
                var re = $(e);
                re.find(".articles-content>.articles-list>li").appendTo($(p).prev());
                var m = re.find(".articles-content>.more-articles");
                if (m.length > 0) {
                    $(p).html(m.html());
                } else {
                    $(p).remove();
                }
            } else {
                $(p).remove();
            }
        }
    });
}